home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / newfile.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-04-10  |  4.5 KB  |  185 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. #ifndef NEWDOC_H
  8. #define NEWDOC_H
  9.  
  10. #include <QDialog>
  11. #include <QListWidget>
  12. class QFormLayout;
  13. class QGridLayout;
  14. class QHBoxLayout;
  15. class QVBoxLayout;
  16. class QFrame;
  17. class QListWidgetItem;
  18. class QGroupBox;
  19. class QSpinBox;
  20. class QLabel;
  21. class QCheckBox;
  22. class QPushButton;
  23. #include "scribusapi.h"
  24. #include "scribusstructs.h"
  25.  
  26. #include "customfdialog.h"
  27. #include "nftwidget.h"
  28.  
  29. class PrefsManager;
  30. class MarginWidget;
  31. class PageLayouts;
  32. class ScrSpinBox;
  33. class ScComboBox;
  34. #if QT_VERSION  >= 0x040300
  35.     class QFileDialog;
  36. #else
  37.     class CustomFDialog;
  38. #endif
  39.  
  40. class SCRIBUS_API PageLayoutsWidget : public QListWidget
  41. {
  42.     Q_OBJECT
  43.  
  44. public:
  45.     PageLayoutsWidget(QWidget* parent);
  46.     ~PageLayoutsWidget() {};
  47.     void arrangeIcons();
  48.     const QSize minimumSizeHint();
  49.     int maxX;
  50.     int maxY;
  51. };
  52.  
  53.  
  54. class SCRIBUS_API NewDoc : public QDialog
  55. {
  56.     Q_OBJECT
  57.  
  58. public:
  59.  
  60.     //! \brief Indexes of the dialog's tabs.
  61.     enum {
  62.         NewDocumentTab = 0,
  63.         NewFromTemplateTab,
  64.         OpenExistingTab,
  65.         OpenRecentTab
  66.     } ActionSelected;
  67.  
  68.     NewDoc( QWidget* parent, const QStringList& recentDocs, bool startUp = false, QString lang = "", QString templateDir = "" );
  69.     ~NewDoc() {};
  70.     void createNewDocPage();
  71.     void createNewFromTempPage();
  72.     void createOpenDocPage();
  73.     void createRecentDocPage();
  74.     void setSize(QString gr);
  75.  
  76.     QTabWidget* tabWidget;
  77.     QFrame* newDocFrame;
  78.     PageLayoutsWidget* layoutsView;
  79.     QLabel* layoutLabel1;
  80.     ScComboBox* firstPage;
  81.     QGroupBox* pageSizeGroupBox;
  82.     MarginWidget* marginGroup;
  83.     QGroupBox* optionsGroupBox;
  84.     QLabel* TextLabel1;
  85.     QLabel* TextLabel2;
  86.     QLabel* TextLabel3;
  87.     QLabel* TextLabel4;
  88.     QLabel* TextLabel1_2;
  89.     QLabel* TextLabel1_3;
  90.     QLabel* pageCountLabel;
  91.     QLabel* TextLabel2_2;
  92.     QLabel* unitOfMeasureLabel;
  93.     QComboBox* pageSizeComboBox;
  94.     QComboBox* pageOrientationComboBox;
  95.     QComboBox* unitOfMeasureComboBox;
  96.     QCheckBox* startUpDialog;
  97.     QCheckBox* autoTextFrame;
  98.     QCheckBox* startDocSetup;
  99.     ScrSpinBox* Distance;
  100.     QSpinBox* numberOfCols;
  101.     QSpinBox* pageCountSpinBox;
  102.     ScrSpinBox* widthSpinBox;
  103.     ScrSpinBox* heightSpinBox;
  104.     QFrame* openDocFrame;
  105. #if QT_VERSION  >= 0x040300
  106.     QFileDialog *fileDialog;
  107. #else
  108.     CustomFDialog *fileDialog;
  109. #endif
  110.     QFrame* newFromTempFrame;
  111.     nftwidget *nftGui;
  112.     QFrame* recentDocFrame;
  113.     QListWidget* recentDocListBox;
  114.     QPushButton* OKButton;
  115.     QPushButton* CancelB;
  116.  
  117.     bool onStartup(void) const { return m_onStartup;}
  118.     int  tabSelected(void) const { return m_tabSelected;}
  119.     QString selectedFile(void) const { return m_selectedFile; }
  120.  
  121.     int    unitIndex(void)   const { return m_unitIndex;}
  122.     QString unitSuffix(void) const { return m_unitSuffix;}
  123.     double unitRatio(void)   const { return m_unitRatio; }
  124.  
  125.     int    orientation(void) const { return m_orientation;} 
  126.     int    precision(void) const { return m_precision;}
  127.     int    choosenLayout(void) const { return m_choosenLayout;}
  128.     double pageWidth(void) const { return m_pageWidth;}
  129.     double pageHeight(void) const { return m_pageHeight;}
  130.     double distance(void) const { return m_distance;}
  131.     double bleedBottom(void) const { return m_bleedBottom;}
  132.     double bleedTop(void)    const { return m_bleedTop;}
  133.     double bleedLeft(void)   const { return m_bleedLeft;}
  134.     double bleedRight(void)  const { return m_bleedRight;}
  135.  
  136. public slots:
  137.     void setHeight(double v);
  138.     void setWidth(double v);
  139.     void selectItem(uint nr);
  140.     void itemSelected(QListWidgetItem* ic);
  141.     void handleAutoFrame();
  142.     void setDistance(double v);
  143.     void setUnit(int u);
  144.     void ExitOK();
  145.     void setOrientation(int ori);
  146.     void setPageSize(const QString &);
  147.     void setDocLayout(int layout);
  148.     /*! Opens document on doubleclick
  149.     \author Petr Vanek <petr@yarpen.cz>
  150.     */
  151.     void recentDocListBox_doubleClicked();
  152.     void openFile();
  153.  
  154. protected:
  155.     QVBoxLayout* TabbedNewDocLayout;
  156.     QHBoxLayout* Layout1;
  157.     QGridLayout* NewDocLayout;
  158.     QGridLayout* pageSizeGroupBoxLayout;
  159.     QFormLayout* optionsGroupBoxLayout;
  160.     QVBoxLayout* openDocLayout;
  161.     QVBoxLayout* recentDocLayout;
  162.     QVBoxLayout *verticalLayout;
  163.     PrefsManager* prefsManager;
  164.     QStringList recentDocList;
  165.  
  166.     double m_unitRatio;
  167.     int m_orientation;
  168.     int m_precision;
  169.     int m_choosenLayout;
  170.     double m_pageWidth;
  171.     double m_pageHeight;
  172.     double m_distance;
  173.     QString m_unitSuffix;
  174.     QString m_selectedFile;
  175.     int m_unitIndex;
  176.     int m_tabSelected;
  177.     bool m_onStartup;
  178.     double m_bleedBottom;
  179.     double m_bleedTop;
  180.     double m_bleedLeft;
  181.     double m_bleedRight;
  182. };
  183.  
  184. #endif // NEWDOC_H
  185.